﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AgregarCuotaPago.aspx.cs" Inherits="Box.Cliente.Logistica.Compras.AgregarCuotaPago" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    
    <div class="col-xs-12">
        <div class="panel panel-primary">
            <div class="panel panel-heading">
                <div class="panel-title">
                    <h3>Agregar Cuotas de Pago</h3>
                </div>
            </div>

            <div class="panel-body">        
                <div class="row">
                    <div class="col-md-8">
                        <label>Nombre:</label>
                        <asp:Label ID="lblName" Text="" Font-Bold="True" Font-Italic="False" Font-Names="Times New Roman" Font-Size="X-Large" runat="server" />
                    </div>
                    <div class="col-sm-2">
                        <label>Nro. de cuotas:</label>
                        <asp:TextBox ID="tbxCantidad" placeholder="Ejm: 2" CssClass="form-control input-sm num" runat="server" />
                        <asp:RequiredFieldValidator ID="rfvCantidad" runat="server" ControlToValidate="tbxCantidad" ErrorMessage=" Ingresa Cantidad" ForeColor="Red"></asp:RequiredFieldValidator>
                    </div>
                    <div class="col-lg-2">
                        <br />
                        <asp:Button ID="btnAgregar" Text="Agregar" CssClass="btn btn-info" runat="server" OnClick="btnAgregar_Click" />
                    </div>
                </div>

                <%--Start ListView--%>
                <asp:ListView ID="lvCuotas" runat="server"
                    ItemType="Box.Entities.PagoCompra">
                    <EmptyDataTemplate>
                    </EmptyDataTemplate>
                    <ItemTemplate>

                        <div class="panel panel-primary">

                            <%--Start panel-heading--%>
                            <div class="panel panel-heading">
                                <h4>Cuota</h4>
                            </div>
                            <%--End panel-heading--%>

                            <%--Start panel-body--%>
                            <div class="panel-body">

                                <div class="row">
                                    <div class="col-md-4">
                                        <label>Comentario:</label>
                                        <asp:TextBox ID="tbxComentario" Text="<%# Bind('Comentario') %>" CssClass="form-control input-sm" runat="server" placeholder="Estes el primer pago" MaxLength="200" />
                                        <asp:RequiredFieldValidator ID="rfvComentario" runat="server" ControlToValidate="tbxComentario" ErrorMessage=" Campo necesario" ForeColor="Red"></asp:RequiredFieldValidator>
                                    </div>
                                    <div class="col-md-2">
                                        <label>Dinero:</label>
                                        <asp:TextBox ID="tbxMonto" Text="234.89" CssClass="form-control input-sm" runat="server" placeholder="Ej: 300.00" MaxLength="9" />
                                        <asp:RequiredFieldValidator ID="rfvMonto" runat="server" ControlToValidate="tbxMonto" ErrorMessage=" Campo necesario" ForeColor="Red"></asp:RequiredFieldValidator>
                                    </div>
                                    <div class="col-md-2">
                                        <label>Fecha Inicio:</label>
                                        <asp:TextBox ID="tbxDia" Text="<%# Bind('FInicio','{0:d}') %>" CssClass="form-control input-sm date" runat="server" MaxLength="10" placeholder="Ej: 03/09/1991" />
                                        <ajaxToolkit:CalendarExtender ID="aceDia"
                                            runat="server" Enabled="True" TargetControlID="tbxDia"
                                            Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                        </ajaxToolkit:CalendarExtender>
                                        <asp:RequiredFieldValidator ID="rfvDia" runat="server" ControlToValidate="tbxDia" ErrorMessage=" Campo necesario" ForeColor="Red"></asp:RequiredFieldValidator>
                                    </div>
                                    <div class="col-md-2">
                                        <label>Fecha Fin:</label>
                                        <asp:TextBox ID="tbxFechFin" Text="<%# Bind('FFin','{0:d}') %>" CssClass="form-control input-sm date" runat="server" MaxLength="10" placeholder="Ej: 03/09/1991" />
                                        <ajaxToolkit:CalendarExtender ID="ceFechfin"
                                            runat="server" Enabled="True" TargetControlID="tbxFechFin"
                                            Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                        </ajaxToolkit:CalendarExtender>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbxFechFin" ErrorMessage=" Campo necesario" ForeColor="Red"></asp:RequiredFieldValidator>
                                    </div>

                                </div>
                            </div>
                            <%--End panel-body--%>
                        </div>
                        <%--End panel-primary--%>
                    </ItemTemplate>
                </asp:ListView>
                <%--End ListView--%>
            </div>
            <div class="panel-footer">
                <a class="btn btn-default" href="frmListCompras.aspx">Atrás</a>
                <asp:Button ID="btnGuardar" CssClass="btn btn-success" Text="Guardar" runat="server" />
            </div>
        </div>
    </div>

</asp:Content>
